package com.lcm.weam.service.sys;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lcm.weam.entity.resp.PageResult;
import com.lcm.weam.entity.sys.FileList;
import com.lcm.weam.entity.sys.User;
import org.springframework.web.multipart.MultipartFile;

import javax.mail.MessagingException;
import java.io.IOException;
import java.util.List;

public interface UserService {

    List<User> selectAll();

    User selectById(String uid);

    User selectByMobile(String mobile);

    IPage<User> selectPageUser(int pageIndex, int pageSize);

    void updateUser(User user);

    Boolean checkPassword(String oldPassword, String uid);

    void changePassword(String newPassword, String uid);

    String uploadPhotoAliOSS(String uid, MultipartFile file) throws IOException;

    void register(User user);

    PageResult<FileList> listFiles(String uid, int page, int num);

    void uploadFileAliOSS(String uid, MultipartFile file, String fileName) throws IOException;

    void send(String username, String email, String uid) throws MessagingException;

    void auth(String uid);
}
